package com.itcast;

import com.itcast.Service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml.bak");
//        DataSource dataSource = (DataSource) ctx.getBean("dataSource");
//        System.out.println(dataSource);
//        UserDao userDao = (UserDao) ctx.getBean("userDao");
//        userDao.save();
        UserService userService = ctx.getBean(UserService.class);
        System.out.println(userService);
    }
}
